 <script th:inline="javascript">
/*<![CDATA[*/

    function del(event,element){
    	event.preventDefault();
      	bootbox.confirm("您确定删除吗?", function(result) {
    	if(result){
    		var _id = $(element).attr("href");
    		BOSS.remoteCall('goods/category/delete',$('#div_category_grid'),{id:_id}); 
    		}
    	}); 
    }
	
/*]]>*/
</script>
<table layout:fragment="categorys_table" class="table table-striped table-bordered  table-advance table-hover" id="category_grid">
	<thead>
		<tr>
			<th>分类名称</th>
			<th>商品数量</th>
			<th>分类描述</th>
			<th>排序</th>
			<th>是否显示</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>	
		<tr class="odd gradeX" th:each="data : ${categorys}" th:attr="data-tt-id=${data.id},data-tt-parent-id=${data.parentId}">
			<td >
<!-- 			 <span th:text="${data.parentCollection}"></span>  -->
			   <a th:href="@{'/goods/goods/index/'+${data.id}}">
				 <span th:text="${data.name}"> hstyle</span>
			   </a>
			</td>
			<td th:text="${data.goodsNum}"></td> 
			<td th:text="${data.description}"> 女装分类</td> 
			<td th:text="${data.displayOrder}">120</td>
			<td class="center" th:text="${data.displayed}? 是:否"> 是</td>
			<td>
				 <a href="" th:href="@{'/goods/category/edit/'+${data.id}}"         id="edit_link_${data.id}}" name="edit_link_${data.id}}" class="btn default btn-xs purple" ><i class="fa fa-edit"></i>编辑</a>|
				 <a href="#" th:href="${data.id}" class="btn default btn-xs purple" id="del_link_${data.id}}" name="del_link_${data.id}}"  onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>
			</td>		 
		</tr>
 	</tbody>
</table>
 <script th:inline="javascript">
/*<![CDATA[*/

    $("#category_grid").treetable({ expandable: true });
    $("#category_grid").treetable('expandAll');

/*]]>*/
</script>